//
//  SINAViewShadowUtils.m
//  sinashebao
//
//  Created by  androidlongs on 2018/4/24.
//  Copyright © 2018年  androidlongs. All rights reserved.
//

#import "SINAViewShadowUtils.h"

@implementation SINAViewShadowUtils

+(UIView *)updateViewShadow:(UIView *)tagView andWithShadowWidth:(NSInteger)shadowWidth andWithShadowHeight:(NSInteger)shadowHeight andWithShadowColor:(UIColor *)shadowColor{
    return [[self class]updateViewShadow:tagView andWithShadowWidth:shadowWidth andWithShadowHeight:shadowHeight andWithShadowColor:shadowColor andWithShadowRadius:2.0 andWithAlpa:0.3];
}
+(UIView *)updateViewShadow:(UIView *)tagView andWithShadowWidth:(NSInteger)shadowWidth andWithShadowHeight:(NSInteger)shadowHeight andWithShadowColor:(UIColor *)shadowColor andWithShadowRadius:(NSInteger)shadowRadius{
    return [[self class]updateViewShadow:tagView andWithShadowWidth:shadowWidth andWithShadowHeight:shadowHeight andWithShadowColor:shadowColor andWithShadowRadius:shadowRadius andWithAlpa:0.3];
}

+(UIView *)updateViewShadow:(UIView *)tagView andWithShadowWidth:(NSInteger)shadowWidth andWithShadowHeight:(NSInteger)shadowHeight andWithShadowColor:(UIColor*)shadowColor andWithShadowRadius:(NSInteger) shadowRadius andWithAlpa:(CGFloat)shadowAlpa{
    //阴影颜色
    tagView.layer.shadowColor = shadowColor.CGColor;
    //偏移距离
    tagView.layer.shadowOffset = CGSizeMake(shadowWidth, shadowHeight);
    //不透明度
    tagView.layer.shadowOpacity = shadowAlpa;
    //半径
    tagView.layer.shadowRadius = shadowRadius;
    return tagView;
}
@end
